﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace csharp_json
{
    class Program
    {
        static void Main(string[] args)
        {
            Dictionary<string, string> dummy = new Dictionary<string, string>();
            dummy.Add("param1", "value1");
            dummy.Add("param2", "value2");

            // stringify
            string stringify_data = JsonConvert.SerializeObject(dummy);
            // parse
            Dictionary<string, string> parse_data = JsonConvert.DeserializeObject<Dictionary<string, string>>(stringify_data);

            Console.WriteLine(">>>>>>>>>>>>> stringify");
            Console.WriteLine(stringify_data);

            Console.WriteLine(">>>>>>>>>>>>> parse");
            Console.WriteLine(parse_data["param1"]);

            Console.Write("Press Anykey...");
            Console.ReadKey();
        }
    }
}
